/**
 * @file router.h
 * @author your name (you@domain.com)
 * @brief
 * @version 0.1
 * @date 2024-07-19
 *
 * @copyright Copyright (c) 2024
 *
 */

#pragma once

#include <array>
#include <functional>
#include <string>
#include <unordered_map>
#include <memory>

#include "defs.h"

namespace wheels {

class Request;
class Response;

class IRouter {
   public:
    using Handler = std::function<void(Request &, Response &)>;

   public:
    IRouter() = default;
    virtual ~IRouter() = default;

    virtual int Register(const char *path, HttpMethod method, Handler handler) = 0;

    virtual Handler GetHandler(const char *path, HttpMethod method) = 0;
};

std::shared_ptr<IRouter> CreateRouter(void);

}  // namespace wheels
